<span class="glyphicon glyphicon-map-marker" aria-hidden="true">
    <span>系统</span>  /
    <span>物流配送</span>  /
    <span>发货地址设置</span>
</span>
<div style="width: 100%;margin-top: 20px;">
    <a name="add" title="添加" class="ncap-btn-big ncap-btn-green"
       href="{:url('Admin/ShopAddress/Add')}" style="background-color: #00a0e9;margin-top: 5px;">添加</a>
    <div class="table-responsive" style="border:0px solid #fff;">
        <table class="table table-hover"  border="1" style="margin: 20px 0px;">
            <tr>
                <td style="width: 13%;vertical-align: middle;">联系人</td>
                <td style="width: 13%;vertical-align: middle;">手机号码</td>
                <td style="width: 13%;vertical-align: middle;">电话号码</td>
                <td style="width: 13%;vertical-align: middle;">公司</td>
                <td style="width: 30%;vertical-align: middle;">发货地址</td>
                <td>操作</td>
            </tr>
            {volist name="list" id="vo"}
            <tr>
                <td style="vertical-align: middle;">{$vo.name}</td>
                <td style="vertical-align: middle;">{$vo.phone}</td>
                <td style="vertical-align: middle;">{$vo.telphone}</td>
                <td style="vertical-align: middle;">{$vo.company}</td>
                <td style="vertical-align: middle;">{$vo.region} {$vo.address}</td>
                <th style="vertical-align: middle;">
                    <a name="edit" title="编辑" class="ncap-btn-big ncap-btn-green"
                       href="{:url('Admin/ShopAddress/edit')}?id={$vo.id}" style="background-color: #00a0e9;margin-top: 5px;">编辑</a>
                    <a name="delete" title="删除" class="ncap-btn-big ncap-btn-green" id="operation{$vo.id}"
                       onclick="ShopAddressDelete('{$vo.id}')" style="background-color: red;margin-top: 5px;">删除</a>
                </th>
            </tr>
            {/volist}
        </table>
        {$list -> render();}
    </div>
</div>
<script type="text/javascript">
    function ShopAddressDelete(id) {
        layer.confirm("请确认是否删除",{
            icon:3,btn:['确认','取消']
        },function () {
            $.ajax({
                type:"post",
                url:"{:url('Admin/ShopAddress/Delete')}",
                data:{id:id},
                success:function (res) {
                    if (res == "删除成功") {
                        success(res);
                    } else {
                        error(res);
                    }
                    setTimeout("location_href()");
                }
            });
        },function () {
            layer.msg("取消操作");
        });
    }
</script>